package com.armani.util;
import com.alibaba.fastjson.JSON;
/**
 * @ProjectName: armani
 * @Package: com.armani.util
 * @ClassName: JsonUtil
 * @Description: json解析工具类
 * @Author: lenovo
 * @Date: 2021/11/25 9:53
 * @Version: 1.0
 * 123
 **/
public class JsonUtil {
    public static String stringify(Object object) {
        return JSON.toJSONString(object);
    }

    public static <T> T parse(String json, Class<T> clazz) {

        if (json == null || json.length() == 0) {
            return null;
        }
        return JSON.parseObject(json,clazz);
    }
}
